const router = require('koa-router')();
const interest = require('../modules/interest');

//获取数据
router.get('/city/interest',async(ctx,next) => {
    ctx.body = await interest.getInterests();
})
//增加数据
router.post('/city/interest',async(ctx,next) => {
    ctx.body = await interest.addInterests(ctx.request.body);
})
//删除数据
router.delete('/city/interest/:placeID/:cityID',async(ctx,next) => {
    ctx.body = await interest.deleteInterests(ctx.params);
})
//修改数据
router.put('/city/interest',async(ctx,next)=>{
    ctx.body = await interest.putInterests(ctx.request.body);
})

module.exports = router;
